﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace NJL.WebManage.Citys
{
    public partial class EditCityDesc :BasePage
    {
        NJL.BLL.NJL_CS_AREA bllArea = new BLL.NJL_CS_AREA();
        NJL.Model.NJL_CS_AREA modelArea;
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                modelArea = bllArea.GetModel(Request.QueryString["id"]);
                txtDesc.Text = modelArea.NJL_DESCRIPTION;
                
            }
        }

        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            modelArea = bllArea.GetModel(Request.QueryString["id"]);
            modelArea.NJL_DESCRIPTION = txtDesc.Text.Trim();
            if (bllArea.Update(modelArea))
            {
                Royalsoft.Common.MessageBox.ShowAndRedirect(this, "更新成功", Request.Url.ToString());
            }
        }
    }
}